package view;

import javax.swing.BoxLayout;
import client.Client;

public class HomePageView extends ChessOnlineView{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6972334587222263846L;
	private LoginForm mLoginForm;
	private RegisterForm mRegisterForm;
	
	public HomePageView(Client mainScreen) {
		super(mainScreen);
		
		mLoginForm = new LoginForm(mainScreen);
		mRegisterForm = new RegisterForm(mainScreen);
	
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		add(mLoginForm);
		add(mRegisterForm);
	}

	@Override
	public void onShow() {
		mLoginForm.onShow();
		mRegisterForm.onShow();
		super.onShow();
	}
	
	@Override
	public void onHide() {
		mLoginForm.onHide();
		mRegisterForm.onHide();
		super.onHide();
	}

	public LoginForm getLoginForm() {
		return mLoginForm;
	}

	public void setmLoginForm(LoginForm mLoginForm) {
		this.mLoginForm = mLoginForm;
	}

	public RegisterForm getRegisterForm() {
		return mRegisterForm;
	}

	public void setmRegisterForm(RegisterForm mRegisterForm) {
		this.mRegisterForm = mRegisterForm;
	}
	
}
